package demo.io;

import java.io.File;
import java.io.IOException;
import java.nio.file.FileSystems;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;

import com.google.common.base.Charsets;

public class FilePathTest {

	public static void main(String[] args) throws IOException {
		testPath();
	}

	public static void testPath() throws IOException {
		Path path = Paths.get("src","");
//		File file=path.toFile();
		System.out.println(path.toUri());
		System.out.println(Files.isDirectory(path));
		System.out.println(Files.newBufferedReader(path, Charsets.UTF_8));
		System.out.println(Files.size(path));
//		System.out.println(Files.readAllLines(path));
		System.out.println(File.pathSeparator);
		System.out.println(File.separator);
		
		System.out.println(FileSystems.getDefault().getRootDirectories());
		System.out.println(FileSystems.getDefault().getSeparator());
		System.out.println(FileSystems.getDefault().getFileStores());
	}
	
}
